Skip to content

log lr hyperparams; add exact match rewards; fix qwen3-base configs; use user/system parts in prompts#3417

Closed
andytwigg wants to merge 13 commits intomainfrom
atwigg/log_lr_hyperparam
Closed

log lr hyperparams; add exact match rewards; fix qwen3-base configs; use user/system parts in prompts#3417
andytwigg wants to merge 13 commits intomainfrom
atwigg/log_lr_hyperparam

Conversation

@andytwigg
Copy link
Copy Markdown
Collaborator

@andytwigg andytwigg commented Mar 14, 2026

Description

this PR includes several changes:
qwen3-base:

  • add missing qwen3-base configs

logging:

  • inject LR as hyperparam to let tunix log LR

rewards:

  • fix bug to use reward_exact_answer in check_numbers instead of hardcoded 1.5
  • add simple check_answer_simple_math reward fn
  • add reward_exact_answer reward (to separate from exact_format_match)
  • add _make_reward_fn wrapper
  • comment out check_answer due to overlap with check_numbers

lora:

  • WIP on lora (enabled=False by default)

data:

  • modify process_data to generate separate user/system parts in prompts

Tests

this setup has been used to show gsm8k and openmath-instruct training on qwen3-{1-8}B

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 14, 2026

Codecov Report

❌ Patch coverage is 10.16949% with 53 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/maxtext/trainers/post_train/rl/utils_rl.py 5.71% 33 Missing ⚠️
src/maxtext/trainers/post_train/rl/train_rl.py 11.11% 16 Missing ⚠️
src/maxtext/integration/tunix/tunix_adapter.py 20.00% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Collaborator

@richjames0 richjames0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Andy. This also includes a bunch of configs so maybe just update the PR title to reflect that

@andytwigg andytwigg changed the title log lr hyperparams; add exact match reward log lr hyperparams; add exact match rewards; fix qwen3-base configs; use user/system parts in prompts Mar 16, 2026
@andytwigg andytwigg requested a review from richjames0 March 16, 2026 18:55
@andytwigg andytwigg closed this Mar 17, 2026
@andytwigg andytwigg deleted the atwigg/log_lr_hyperparam branch March 17, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants